<?php

use Illuminate\Support\Facades\Schema;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Database\Migrations\Migration;

class CreateLostsTable extends Migration
{
    /**
     * Run the migrations.
     *
     * @return void
     */
    public function up()
    {
        Schema::create('lost', function (Blueprint $table) {
            $table->increments('id');
            $table->string('description')->comment('描述');
            $table->string('cover')->nullable()->comment('封面图');
            $table->string('number', 12)->nullable()->comment('失物者学号');
            $table->string('name', 16)->nullable()->comment('失物者姓名');
            $table->string('class', 64)->nullable()->comment('失物者班级');
            $table->string('publisher', 64)->comment('发布者openId');
            $table->integer('role')->default(0)->comment('发布者角色 0-普通人 1-膳管');
            $table->tinyInteger('status')->default(0)->comment('状态：0-未审核 1-审核通过 2-已完成 3-审核不通过');
            $table->timestamps();
            $table->softDeletes();
        });
    }

    /**
     * Reverse the migrations.
     *
     * @return void
     */
    public function down()
    {
        Schema::dropIfExists('lost');
    }
}
